class Person {
    // 定义实例属性，需要通过实例对象访问
    name: string = "李白";

    // 定义静态属性，不需要创建实例对象就可以访问，而是通过类直接访问
    static age:number = 200;

    static readonly dynasty:string = "唐朝"
    readonly occupation:string = "诗人"
}

const per = new Person()
console.log("实例属性name：",per.name)
console.log("静态属性age:",Person.age)
console.log("实例属性+只读属性occupation:",per.occupation)
console.log("静态属性+只读属性dynasty:",Person.dynasty)




